import testping_pingparser
import os

folder_name_result = "result"
folder_name_log_from_client = "log_from_client"

def create_folder(folder_name):
    try:
        os.mkdir(folder_name)
        print(f"文件夹 {folder_name} 创建成功")

    except FileExistsError:
        print(f"文件夹 {folder_name} 已经存在")
    except PermissionError:
        print(f"没有权限创建文件夹 {folder_name}")

create_folder(folder_name_result)
create_folder(folder_name_log_from_client)

do_test_ping = True
if __name__ == "__main__":
    if do_test_ping:
        testping_pingparser.analyze_pingdata()